package com.dong.order.web;

import com.dong.order.service.OrderService;
import com.dong.order.vo.OrderCreateVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;
    @PostMapping
    public void createOrder(@RequestBody OrderCreateVO orderCreateVO) {
        log.info("order creating :  {}",orderCreateVO);
        orderService.createOrder(orderCreateVO);
    }
}
